package com.xcc.annotation.ext;

import com.xcc.annotation.ext.config.ExtConfig;
import com.xcc.annotation.ext.core.Demo03_EventPublisher;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MainExtTest {

    @Test
    public void testBeanFactory() {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ExtConfig.class);
        System.out.println("*************************************");
        Demo03_EventPublisher bean = applicationContext.getBean(Demo03_EventPublisher.class);
        bean.publishCat();
        applicationContext.close();
    }

}
